package com.tucy.logistics.modules.organization.service;

import com.tucy.logistics.common.entity.organization.OrganizationBusinessDepartment;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;
import java.util.List;

/**
* @author tucy123
* @description 针对表【organization_business_department(物流营业部)】的数据库操作Service
* @createDate 2023-09-15 16:10:16
*/
public interface OrganizationBusinessDepartmentService extends IService<OrganizationBusinessDepartment> {

    /**
     * 新增修改营业部
     * @param department
     * @return
     */
    Boolean saveOrUpdateBusiness(OrganizationBusinessDepartment department);

    /**
     * 查询营业部
     * @return
     */
    List<OrganizationBusinessDepartment> queryBusiness();

    /**
     * 营业部详情
     * @param id
     * @return
     */
    OrganizationBusinessDepartment queryBusinessDetails(String id);

    /**
     * 删除营业部
     * @return
     */
    Boolean deleteBusiness(String id);

    /**
     * 查询父类机构
     * @param type
     * @return
     */
    List<OrganizationBusinessDepartment> queryParentBusiness(String type);

    /**
     * 增改机构范围
     * @param department
     * @return
     */
    Boolean saveUpdateBusinessRange(OrganizationBusinessDepartment department);

    /**
     * 删除机构范围
     * @param id
     * @return
     */
    Boolean deleteBusinessRange(String id);

    /**
     * 导出营业机构
     * @return
     */
    void exportBusiness(HttpServletResponse response) throws Exception;
}
